
    let submit = document.querySelector(".submit");
    let usernameid = document.querySelector("#username");
    let passwordid = document.querySelector("#password");

    submit.onclick = function(){
        let username = usernameid.value;
        let password = passwordid.value;
        
        prom('./api/v1/user/reg.php',{username,password}).then(reg =>{
            if(reg.code === 200){
                alert('注册成功！')
            }else{
                alert('注册失败！')
            }
            setTimeout(() => {
                $('#shopReg').modal('hide')
            },20)
        })

    }
